//
//  ViewController.m
//  YJTeacher_Demo_OC
//
//  Created by upplus on 2023/9/12.
//

#import "ViewController.h"
#import <YJTeacher/YJTeacher-Swift.h>

@interface ViewController () <FJTea_WebViewControllerDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"点击屏幕跳转";
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    // normal
    FJTea_WebViewController *vc = [[FJTea_WebViewController alloc] initWithToken:@"e5daad7d-758e-4420-81c7-90f21b12ff25" parameters:nil]; // 传入token
    [self.navigationController pushViewController:vc animated:YES];
    
    // detail
    NSDictionary *params = @{
        @"homeworkId": @"FD43DC088474A8ECB10BA99314D3BB31",
        @"classHomeworkPaperId": @"FD43DC088574445ACF7844F93C6046D5"
    };

    NSDictionary *dic = @{
        @"name": @"practiceDetail",
        @"params": params
    };
    FJTea_WebViewController *vc1 = [[FJTea_WebViewController alloc] initWithToken:@"e5daad7d-758e-4420-81c7-90f21b12ff25" parameters:dic]; // 传入token
    vc1.delegate = self;
    [self.navigationController pushViewController:vc1 animated:YES];
}

#pragma mark - FJTea_WebViewControllerDelegate
- (void)yijiaTeacherViewControllerClosed {
    NSLog(@"sdk关闭了");
}

@end
